package com.hd123.rumba.gwt.widget.client.grid;

import com.hd123.rumba.gwt.widget.client.ComboBox;

public class ComboBoxEditor extends ComboBox implements CellEditor {

  public ComboBoxEditor() {
    super();
  }

  public void activate(DxGrid grid, int row, int col, String text, String width, String height,
      boolean readOnly) {
    setValue(text);
    super.setWidth(width);
    super.setHeight("97%");
    grid.setWidget(row, col, this);
    super.setFocus(true);
  }

  public String getValue() {
    return super.getText();
  }

  public boolean isLeftKeyToLeave() {
    return true;
  }

  public boolean isRightKeyToLeave() {
    return true;
  }

  public void setValue(String value) {
    super.setText(value);
  }
}
